<?php
include "dbc.php";
$username=$_GET['value'];
if(!$username){
    $errors = "Username is not defined!";
    }
if($username){
    if(!ctype_alnum($username)){
    $errors = "Username can only contain numbers and letters!";
    }
     
    $range = range(4,32);
    if(!in_array(strlen($username),$range)){
    $errors = "Username must be between 4 and 32 characters!";
    }
    }
echo $errors;
mysql_close();
?>